import React from "react";
import { ListRow } from "../../types";

interface ListState{
    v:ListRow
    onClick:()=>void
}

const ListItem:React.FC<ListState>=(props)=>{
    const {v,onClick}=props
    return (
        <dl key={v.id} onClick={onClick}>
            <dt><img src={v.image} alt="" /></dt>
            <dd>
                <h3>{v.title}</h3>
                <p>{v.word}</p>
                <p>{v.price}</p>
            </dd>
        </dl>
    )
}

export default ListItem